package goodroommate.dao;

import java.util.ArrayList;

import goodroommate.dal.DatabaseSession;
import goodroommate.domain.Answer;
import goodroommate.domain.Option;
import goodroommate.domain.Question;
import goodroommate.domain.Questionnaire;
import goodroommate.exception.DatabaseException;

public interface IQuestionnaireDao {

	public Questionnaire addQuestionnaire(Questionnaire questionnaire, DatabaseSession dbs) throws DatabaseException;

	public Question addQuestion(Question question, DatabaseSession dbs) throws DatabaseException;

	public boolean addOption(Option option, DatabaseSession dbs) throws DatabaseException;

	public ArrayList<Questionnaire> getAllQuestionnaire(DatabaseSession dbs) throws DatabaseException;

	public ArrayList<Option> getOptionByQuestionID(long questionid, DatabaseSession dbs) throws DatabaseException;

	public ArrayList<Question> getQuestionByQuestionnaireID(long questionnaireid, DatabaseSession dbs)
			throws DatabaseException;

	public Questionnaire getQuestionnaireByQuestionnaireID(long questionnaireid, DatabaseSession dbs)
			throws DatabaseException;

	public boolean addAnswer(Answer answer, DatabaseSession dbs) throws DatabaseException;

	public ArrayList<Questionnaire> getMyQuestionnaires(long userid, DatabaseSession dbs) throws DatabaseException;
	
	public ArrayList<Answer> getMyAnswersByQuestionnaireID(long userid, long questionnaireid, DatabaseSession dbs)
			throws DatabaseException;

}
